<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template header}
	<div id="app">
		<div id="shadow" style="display: none;"></div> 
		<header class="top">
			<span style="display: none;">加载中...</span> 
			<span>代理报表</span>
			<a href="{U('agent/index')}" class="iconfont back"></a> 
		</header> 
		<div class="main">
			<div>
				<div class="textMore dataType">
        			<em class="tag_choice_day">今天</em> 
        			<i class="iconfont"></i>
        		</div> 
        		<div class="_problemBox tag_choice_item" style="display: none;">
        			<div class="blackBg"></div> 
        			<div class="moreLayer">
        				<ul class="tag_choice_item_li">
        					<li ami="0">
        						<a>今天</a> 
        					</li>
        					<p class="hr1px"></p>
        					<li ami="1">
        						<a>昨天</a> 
        					</li>
        					<p class="hr1px"></p>
        					<li ami="2">
        						<a>本月</a> 
        					</li>
        					<p class="hr1px"></p>
        					<li ami="3">
        						<a>上月</a> 
        					</li>
        				</ul> 
        				<ul class="tag_choice_close">
        					<li>
        						<a>取消</a>
        					</li>
        				</ul>
        			</div>
        		</div>
        		<div class="searchBtn">
        			<div class="searchCon">
        				<input type="text" placeholder="下级报表查询" class="user-input proxySearch" id="id_search_input">
        			</div> 
        			<a id="submitBtn" class="tag_submitbtn">
        				<div class="submitTouch"><i class="iconfont"></i></div>
        			</a>
        		</div>
        		
        		<div id="proxy3colCon" class="proxy3colCon" style="">
        			<ul class="PLSdetail fix" id="id_agent_repoint_item">
        				<li><span>0.00</span>投注金额</li>
        				<li><span>0.00</span>中奖金额</li>
        				<li><span>0.00</span>活动礼金</li>
        				<li><span>0.00</span>团队返点</li>
        				<li><span>0.00</span>团队盈利</li>
        				<li><span>0.00</span>充值金额</li>
        				<li><span>0.00</span>提现金额</li>
        				<li><span>0</span>首充人数</li><li>
        				<span>0</span>注册人数</li>
        				<li><span>0</span>投注人数</li>
        				<li><span>3</span>下级人数</li>
        				<li><span>0.00</span>团队余额</li>
        				<li><span>0.00</span>代理返点</li>
        				<li><span>0.00</span>代理工资</li>
        				<li><span>0.00</span>代理分红</li> 
        				<li></li>
        				<li></li>
        				<li></li>
        			</ul>
        		</div>
			</div> 
			<div class="_problemBox" style="display: none;">
				<div class="blackBg"></div> 
				<div class="moreLayer">
					<ul><li><a>取消</a></li></ul>
				</div>
			</div>
		</div> 
	</div>
	<script src="static/js/member/member_common_func.js"></script>
	<script type="text/javascript">
    	//用户选择哪天的记录
		$('.tag_choice_day').on('click', '', function (){
			$('.tag_choice_item').show();
		})
		$('.tag_choice_close').on('click', '', function (){
			$('.tag_choice_item').hide();
		})
    	// 查看哪个时间段的投注订单
		var choice_day = 'today';
		var check      = 0; 
		$('.tag_choice_item_li li').on('click','', function (){
			check = $(this).attr('ami');
			if(check == '0'){
				choice_day = 'today';
				$('.tag_choice_day').html('今天');
			}else if (check == '1'){
				choice_day = 'yesterday';
				$('.tag_choice_day').html('昨天');
			}else if (check == '2'){
				choice_day = 'benyue';
				$('.tag_choice_day').html('本月');
			}else if (check == '3'){
				choice_day = 'shangyue';
				$('.tag_choice_day').html('上月');
			}
			$('.tag_choice_item').hide();
			fillBody();
		})
		
		$('.tag_submitbtn').on('click', '', function (){
			fillBody();
		})
		var resData = '';
		function fillBody(){
			$('#id_agent_repoint_item span').html('0');
			var param   = {'operation':'getAgentReport', 'timeLine':check, 'forUser':$('#id_search_input').val()};
			getData("{U('json/func_member')}", param);
			$('#id_agent_repoint_item span:eq(0)').html(resData.betAmount);
			$('#id_agent_repoint_item span:eq(1)').html(resData.prizeAmount);
			$('#id_agent_repoint_item span:eq(5)').html(resData.rechargeAmount);
			$('#id_agent_repoint_item span:eq(6)').html(resData.cashAmount);
			$('#id_agent_repoint_item span:eq(8)').html(resData.regUserNums);
			$('#id_agent_repoint_item span:eq(9)').html(resData.betUserNums);
			$('#id_agent_repoint_item span:eq(10)').html(resData.lower_nums);
			$('#id_agent_repoint_item span:eq(12)').html(resData.repointAmount);
		}
		fillBody();
    </script>
    
    {template footer}
</html>
